package com.zkr.planclass.mapper;

import com.zkr.planclass.model.PlanClassAddVo;
import com.zkr.planclass.model.PlanClassSelectVo;
import com.zkr.planclass.model.PlanClassVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * Created by lenovo on 2020/12/11.
 */
@Mapper
public interface PlanClassMapper {


    int queryCount(PlanClassSelectVo planClassSelectVo);

    List<PlanClassVo> queryPage(PlanClassSelectVo planClassSelectVo);

    @Select("select * from planclass where name = #{name} ")
    PlanClassVo queryByName(@NotBlank(message = "名称不能为空！") String name);

    /*@Select("select * from planclass where code = #{code}")
    PlanClassVo queryByCode(@NotBlank(message = "编码不能为空！") String code);*/

   /* @Insert("insert into planclass (code,name,remark,status,createName,createTime,updateName,updateTime)"+
           "values(#{code},#{name},#{remark},#{status},#{createName},#{createTime},#{updateName},#{updateTime})")
   void insertPlanClass(PlanClassVo planClassVo);*/

   // PlanClassVo queryById(Integer id);

    void update(PlanClassVo planClassVo1);

    void updateStatus(PlanClassVo planClassVo1);

    List<String> queryByCodes(List<String> codeList);

    void adds(@Valid List<PlanClassAddVo> planClassAddVoList);

    List<PlanClassVo> queryExportData(PlanClassSelectVo planClassSelectVo);
}
